package com.educate.ucenter.dao;

import com.educate.ucenter.dao.impl.AccountDaoImpl;
import com.educate.ucenter.model.bo.AccountBO;
import com.educate.ucenter.model.po.Account;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountDao extends MongoRepository<Account, String> {

    /**
     * #{@link AccountDaoImpl#query(AccountBO, Pageable)}
     */
    Page<Account> query(AccountBO bo, Pageable pageable);

    Account findByTypeAndOpenId(String type, String openId);
}
